package cn.nohan.funplay.module.member.mongo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.util.List;

import com.mongoplus.annotation.ID;
import com.mongoplus.annotation.collection.CollectionField;
import com.mongoplus.annotation.collection.CollectionLogic;
import com.mongoplus.annotation.collection.CollectionName;
import com.mongoplus.enums.LogicDataType;
import lombok.Data;

@CollectionName("dynamic")
@Data
public class MongoDynamicEntity {

    @ID
    private String id;

    /**
     * 用户ID
     */
    @CollectionField("userId")
    private Long userId;

    /**
     * 动态内容
     */
    @CollectionField("content")
    private String content;

    /**
     * 位置
     */
    @CollectionField("address")
    private String address;

    /**
     * 经度
     */
    @CollectionField("longitude")
    private double longitude;

    /**
     * 纬度
     */
    @CollectionField("latitude")
    private double latitude;

    /**
     * 图片或者视频
     */
    @CollectionField("resources")
    private List<String> resources;

    /**
     * 年月
     */
    @CollectionField("month")
    private String month;

    /**
     * 市级ID
     */
    @CollectionField("cityId")
    private Integer cityId;

    /**
     * 运营商ID
     */
    @CollectionField("tenantId")
    private Long tenantId;

    /**
     * IP对应地区
     */
    @CollectionField("ipAddr")
    private String ipAddr;

    /**
     * 状态【字典项：dynamic_status(审批状态【0：待审核，1：审核未通过，2：审核通过，3：已下架】)】
     */
    @CollectionField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @CollectionField("createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
    private Date createTime;

    /**
     * 资源类型 DynamicResourceTypeEnum
     */
    @CollectionField("resourceType")
    private Integer resourceType;

    /**
     * 审核备注
     */
    @CollectionField("checkRemark")
    private String checkRemark;

    @CollectionField("tags")
    private List<String> tags;


    @CollectionField("publishLocation")
    private Integer publishLocation;
//
//    @CollectionField("deleted")
//    @CollectionLogic(value ="false",delval = "true", delType = LogicDataType.BOOLEAN)
//    private Boolean deleted;
}

